﻿using System;
using DataEntities.Base;

namespace DataEntities
{
    public class DogovorExtraInfo:BusinesObjectBase
    {
        private Dogovor _dogovor;
        private DateTime _extraInfoDate;
        private string _extraInfoText;

        public virtual Dogovor Dogovor { get { return _dogovor; } set { _dogovor = value; } }
        public virtual DateTime ExtraInfoDate { get { return _extraInfoDate; }set{_extraInfoDate=new DateTime(value.Year,value.Month,value.Day);} }
        public virtual string ExtraInfoText { get { return _extraInfoText; } set { _extraInfoText = value; } }

        protected DogovorExtraInfo():this(0,new DateTime(1900,01,01),string.Empty ){}
        public DogovorExtraInfo(DateTime extraInfoDate,string extraInfoText) : this(0,extraInfoDate,extraInfoText){}
        public DogovorExtraInfo(int id,DateTime extraInfoDate,string extraInfoText):base(id)
        {
            _extraInfoDate = extraInfoDate;
            _extraInfoText = extraInfoText;
        }
    }
}